package com.dingxin.ship_together_api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
* Author: ctj
* Date: 2022-09-27
* Time: 17:16
*/

/**
    * 航线座位表
    */
@ApiModel(value="航线座位表")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "ship_together.route_seat")
public class RouteSeat implements Serializable {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value="")
    private Long id;

    /**
     * 座位编号
     */
    @TableField(value = "seat_no")
    @ApiModelProperty(value="座位编号")
    @NotBlank(message = "座位编号不能为空")
    private String seatNo;

    /**
     * 座位价格，拼船使用
     */
    @TableField(value = "amount")
    @ApiModelProperty(value="座位价格")
    private Long amount;

    /**
     * 是否被使用
     */
    @TableField(value = "used")
    @ApiModelProperty(value="是否被使用")
    private Boolean used;


    /**
     * 创建人
     */
    @TableField(value = "create_by" ,fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建人")
    @JsonIgnore
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建时间")
    @JsonIgnore
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "update_by",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="更新人")
    @JsonIgnore
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="更新时间")
    @JsonIgnore
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "deleted")
    @ApiModelProperty(value="是否删除")
    @JsonIgnore
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_SEAT_NO = "seat_no";

    public static final String COL_USED = "used";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_DELETED = "deleted";
}